package com.tuanbiao.models.action;

import com.amap.api.maps.model.LatLng;
import com.hzjq.data.entity.BlastLonLat;
import com.hzjq.lib.BlastKool;
import com.hzjq.lib.location.LocationLoader;

/**
 * @author abiao
 * @since 2022/4/24 11:20
 */
public interface LocationAction {
    default LocationLoader getLocation() {
        return BlastKool.Companion.loader().location();
    }

    default BlastLonLat getMarkPoint() {
        return BlastKool.Companion.loader().location().getMarkPoint();
    }

    default void saveMarkPoint(BlastLonLat blastLonLat) {
        BlastKool.Companion.loader().location().saveMarkPoint(blastLonLat);
    }

    default float calculateLineDistance(LatLng point1, LatLng point2) {
        return BlastKool.Companion.loader().location().calculateLineDistance(point1, point2);
    }

    default void refreshAuth() {
        BlastKool.Companion.loader().location().refreshAuth();
    }
}

